﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Order.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
    <!--开始-->
	<table class="layui-table" lay-skin="line" lay-size="lg">
		<colgroup>
		<col width="300">
		<col width="150">
		<col width="250">
        <col width="150">
            <col width="150">
            <col width="150">
		<col>
		</colgroup>
		<thead>
		<tr style="background-color:white ; color: #8C222C;">
			<th>订单ID</th>
            <th>图书ID</th>
			<th>订购时间</th>
            <th>订单金额</th>
            <th>数量</th>
			<th>订单状态</th>
		</tr> 
		</thead>
		<tbody>
            <%
                foreach (var item in orders)
                {
                    string show="";
                    switch (item.BookingStatus.ToString())
                    {
                        case "Success":
                            show="完成订单";
                            break;
                        case "UnPay":
                            show = "待支付";
                            break;
                        case "Pay":
                            show = "已支付";
                            break;
                        case "JoinCar":
                            show = "商品还在购物车中";
                            break;
                        case "Like":
                            show = "商品在我的心愿单中";
                            break;
                        default:
                            break;

                    }
                    %>
            
                 <tr>
			        <td><%=item.OrderID %></td>
                     <td><%=item.BookID %></td>
                    <td><%=item.BookingTime %></td>
                     <td><%=item.Price %></td>
                     <td><%=item.Num %></td>
                    <td><%=show %></td>
		        </tr>
            <%
                }
                %>
		
		</tbody>
	</table>
	<!--结束-->
</asp:Content>

